// Bachelor of Software Engineering 
// Media Design School 
// Auckland
// New Zealand
// 
// (c) 2005 - 2014 Media Design School 
// 
// File Name : Tableau.h
// Description : Tableau header
// Author : Serge Radinovich
// Mail : srad015@hotmail.com

#pragma once
#include "CardPileGroup.h"
#include "Move.h"

class Tableau : public CardPileGroup
{


	bool ValidCardDeposit(const Card* const _pCard, const int _iPile) const;
	
public:

	void FlipTopCards();

	static const int s_kiTop = 254;					//Top left of letmost card in tableau
	static const int s_kiLeft = 10;
	static const int s_kiSpaceBetweenPiles = 100;		
	static const int s_kiSpaceBetweenCards = 20;
	int m_iLeftEdgeOfPile[7];						//Leftmost X value of each pile

	Tableau(std::list<Card*>* _Cards28);
	~Tableau(void);

	void ArrangeCardPositions();
	void InitializeAnimate(CardPileGroup* _pStock);

	//Overloaded pure virtual functions from CardPileGroup
	void Draw();
	std::list<Card*>* AttemptCardGrab(Vector2 _clickPos, std::list<Card*>* grabbedCards);
	bool AttemptCardDeposit(Vector2 _clickPos, std::list<Card*>* _pGrabbedCards,  std::list<Card*>* &_pListDepositedTo);
	void UndoMove(Move* _move);
};

